#include <iostream>
#include <time.h>
#include <math.h>


#include "gfx.h"
#include "game.h"

#include "pathplan2.h"
#include "screenEater.h"

using namespace std;

enum states
{
    e_intro,
    e_title,
    e_game,
    e_gameover,
    e_exit

} gamestate;

class racer
{
    public:
    void title();
    void intro();
    void maingame();
    void gameover();

    void statemachine();

    racer();

    private:
    int w;
    int h;
    bool twoplayer;

    polaris::window *win;
    polaris::player *p1;

    polaris::player *titlescreen;
    polaris::player *introscreen;

    polaris::player *p2;
    polaris::player *background[2];
    polaris::player *backgroundP2[2];


    polaris::player *scorescreen;


    polaris::sound *music;

    polaris::logic *log;
    polaris::logic *log2;

    int citysize;
    int *city;


    pathplan2 *plan;

    polaris::eater *eat;

};
